package top.caoayu.pattern;

/**
 * @Author: caoxinyu
 * @Date: 2023/8/31-18:54
 */
public class PatternApplication {

    public static void main(String[] args) {
        SingleDemo singleDemo = SingleDemo.getInstance();
        SingleDemo singleDemo1 = SingleDemo.getInstance();
        SingleDemo singleDemo2 = SingleDemo.getInstance();
        System.out.println(singleDemo.equals(singleDemo1));
        System.out.println(singleDemo1.equals(singleDemo2));
        System.out.println(singleDemo == singleDemo2);
    }
}
